//
//  KABasicAnimation.h
//  KAnimation
//
//  Created by Kien Tran on 5/31/13.
//  Copyright (c) 2013 TTK. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef enum {
    eKABasicAnimationStrengthNone = 0,
    eKABasicAnimationStrengthWeak ,
    eKABasicAnimationStrengthStrong
} eKABasicAnimationStrength;

@interface KABasicAnimation : NSObject


/**
 * Shake aniamtion
 * @param strength is a eKABasicAnimationStrength enum
 * @param duration Determines how many seconds the animation will repeat for
 * @param repeat Determines the number of times the animation will repeat. If repeat < 0, will repeat forever
 * @param block Sets the completion block object
 * @see eKABasicAnimationStrength
 */
+ (void)shake:(UIView *)view withRingStrength:(eKABasicAnimationStrength) strength inDuration:(NSTimeInterval) duration withRepeat:(NSInteger)repeat withCompletionBlock:(void(^)())block;

/**
 * Shake aniamtion
 * @param duration Determines how many seconds the animation will repeat for
 * @param repeat Determines the number of times the animation will repeat. If repeat < 0, will repeat forever
 */
+ (void)shake:(UIView *)view inDuration:(NSTimeInterval) duration  withRepeat:(NSInteger)repeat;

/**
 * Shake aniamtion
 * @param strength is a eKABasicAnimationStrength enum
 * @param duration Determines how many seconds the animation will repeat for
 * @param repeat Determines the number of times the animation will repeat. If repeat < 0, will repeat forever
 * @see eKABasicAnimationStrength
 */
+ (void)shake:(UIView *)view withRingStrength:(NSInteger) strength inDuration:(NSTimeInterval) duration  withRepeat:(NSInteger)repeat ;

/**
 * Shake aniamtion
 * @param strength is a eKABasicAnimationStrength enum
 * @see eKABasicAnimationStrength
 */
+ (void)shake:(UIView *)view withRingStrength:(NSInteger) strength;

/**
 * Fade in effect
 * @param duration Determines how many seconds the animation will repeat for
 * @param delay Determines how many seconds the animation will start
 * @param options A mask of options indicating how you want to perform the animations. For a list of valid constants, see UIViewAnimationOptions.
 * @param block Sets the completion block object
 */
+ (void)fadeIn:(UIView *)view inDuration:(NSTimeInterval) duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options withCompletionBlock:(void(^)(BOOL finished))block;

/**
 * Fade in effect
 * @param duration Determines how many seconds the animation will repeat for
 * @param delay Determines how many seconds the animation will start
 * @param options A mask of options indicating how you want to perform the animations. For a list of valid constants, see UIViewAnimationOptions.
 */
+ (void)fadeIn:(UIView *)view inDuration:(NSTimeInterval) duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options;

/**
 * Fade in effect
 * @param duration Determines how many seconds the animation will repeat for
 */
+ (void)fadeIn:(UIView *)view inDuration:(NSTimeInterval) duration;

/**
 * Fade out effect
 * @param duration Determines how many seconds the animation will repeat for
 * @param delay Determines how many seconds the animation will start
 * @param options A mask of options indicating how you want to perform the animations. For a list of valid constants, see UIViewAnimationOptions.
 * @param block Sets the completion block object
 */
+ (void)fadeOut:(UIView *)view inDuration:(NSTimeInterval) duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options withCompletionBlock:(void(^)(BOOL finished))block;

/**
 * Fade out effect
 * @param duration Determines how many seconds the animation will repeat for
 * @param delay Determines how many seconds the animation will start
 * @param options A mask of options indicating how you want to perform the animations. For a list of valid constants, see UIViewAnimationOptions.
 */
+ (void)fadeOut:(UIView *)view inDuration:(NSTimeInterval) duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options;

/**
 * Fade out effect
 * @param duration Determines how many seconds the animation will repeat for
 */
+ (void)fadeOut:(UIView *)view inDuration:(NSTimeInterval) duration;

/**
 * rotate 360 effect
 * @param duration Determines how many seconds the animation will repeat for
 * @param delay Determines how many seconds the animation will start
 * @param loopNumber Determines how many loop will rotate. If loopNumber < 0, will rotate forever
 * @param options A mask of options indicating how you want to perform the animations. For a list of valid constants, see UIViewAnimationOptions.
 * @param leftToRight Determines the views will rotate left to right. else rotate right to left
 * @param block Sets the completion block object
 */
+ (void)rotate360:(UIView *)view inDuration:(NSTimeInterval) duration delay:(NSTimeInterval)delay withLoopNumber:(NSInteger)loopNumber rightToLeft:(BOOL)leftToRight options:(UIViewAnimationOptions) options withCompletionBlock:(void(^)())block;

/**
 * rotate 360 effect
 * @param duration Determines how many seconds the animation will repeat for
 * @param delay Determines how many seconds the animation will start
 * @param loopNumber Determines how many loop will rotate. If loopNumber < 0, will rotate forever
 * @param options A mask of options indicating how you want to perform the animations. For a list of valid constants, see UIViewAnimationOptions.
 * @param leftToRight Determines the views will rotate left to right. else rotate right to left
 */
+ (void)rotate360:(UIView *)view inDuration:(NSTimeInterval) duration delay:(NSTimeInterval)delay withLoopNumber:(NSInteger)loopNumber rightToLeft:(BOOL)leftToRight options:(UIViewAnimationOptions) options;

/**
 * rotate 360 effect
 * @param duration Determines how many seconds the animation will repeat for
 * @param delay Determines how many seconds the animation will start
 * @param loopNumber Determines how many loop will rotate. If loopNumber < 0, will rotate forever
 * @param leftToRight Determines the views will rotate left to right. else rotate right to left
 */
+ (void)rotate360:(UIView *)view inDuration:(NSTimeInterval) duration withLoopNumber:(NSInteger)loopNumber rightToLeft:(BOOL)leftToRight ;

/**
 * rotate 360 effect
 * @param loopNumber Determines how many loop will rotate. If loopNumber < 0, will rotate forever
 */
+ (void)rotate360:(UIView *)view withLoopNumber:(NSInteger)loopNumber;
@end
